home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: June 2000
- // Author: alipka
- //
- // Description:
- //
- // Option tool property window for Artisan tools
- //
- //
- // Procedure Name:
- // artisanProperties
- //
- // Description:
- // Initialize the option values.
- //
- // Input Arguments:
- //
- // Return Value:
- // None.
- //
-
- global proc artisanCreateBrushFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Create Artisan brush options.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout;
- separator -h 5 -style "none";
-
- floatSliderGrp -field true -l "Radius(U)"
- -ann "Upper brush radius limit."
- -precision 4
- -min 0.0 -max 50.0
- -step 0.05
- upperRadiusSlider;
-
- floatSliderGrp -field true -l "Radius(L)"
- -ann "Lower brush radius limit."
- -precision 4
- -min 0.0 -max 50.0
- -step 0.05
- lowerRadiusSlider;
-
- if ( $currTool != "artSelect" ) {
- floatSliderGrp -field true -l "Opacity"
- -ann "Brush opacity."
- -precision 4
- -min 0.0 -max 1.0
- -step 0.05
- opacitySlider;
- }
-
- separator -h 5 -style "none";
-
- rowColumnLayout -nc 7
- -cw 1 100 -cw 2 35 -cw 3 35
- -cw 4 35 -cw 5 35 -cw 6 35
- -cs 6 10 -cw 7 60;
-
- text -al "right"
- -l "Profile "
- -ann "Stamp profiles."
- profileText;
-
- symbolCheckBox -w 35 -h 36 -i "circleGaus.xpm"
- -ann "Gaussian brush." spGaussianChBx;
- symbolCheckBox -w 35 -h 36 -i "circlePoly.xpm"
- -ann "Soft brush." spPolyBrushChBx;
- symbolCheckBox -w 35 -h 36 -i "circleSolid.xpm"
- -ann "Solid brush." spSolidChBx;
- symbolCheckBox -w 35 -h 36 -i "rect.xpm"
- -ann "Square brush." spRectBrushChBx;
- symbolCheckBox -w 35 -h 36 -i "file.xpm"
- -ann "Last image file - shape brush profile." artFileBrushChBx;
-
- button -l " Browse" -ann "File browser." spShapeButton;
- separator -h 5 -style "none";
- setParent ..;
-
- separator -h 5 -style "none";
-
- checkBoxGrp
- -l "" -l1 "Rotate To Stroke"
- -ann "Brush alignment: path alignment or up vector."
- artBrushAlignmentChkBox;
- setParent ..;
-
- setUITemplate -popTemplate;
- }
-
-
- global proc artisanCreateStrokeFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Create a stroke UI for all Artisan tools.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout -adj true;
- // Projective Paint Mode checkbox.
- checkBoxGrp
- -l "" -l1 "Screen Projection"
- -ann "Paint mode."
- artProjectionModeChkBox;
-
- // Reflection
- checkBoxGrp -ncb 3 -cw4 131 50 50 50
- -label "Reflection"
- -labelArray3 "X" "Y" "Z"
- -ann "Reflection axis."
- artReflectionChBox;
-
- separator -h 5 -style "single";
- separator -h 5 -style "none";
-
- // Stamp Quality Sliders.
- floatSliderGrp -field true -label "Stamp Spacing"
- -ann "Spacing between stamps."
- -precision 3
- -min 0.01 -max 10.0
- -fieldMinValue 0.001 -fieldMaxValue 100.0
- -v 1.0
- -step 0.01
- artStampSpacingSlider;
-
- floatSliderGrp -field true -l "Stamp Depth"
- -ann "Depth of a single stamp."
- -precision 3
- -min 0.01 -max 10.0
- -fieldMinValue 0.001 -fieldMaxValue 100.0
- -v 1.0
- -step 0.01
- artStampDepthSlider;
-
- // Make one more option for the Paint Select tool.
- if ( $currTool == "artSelect" ) {
- separator -h 10 -style "none";
- separator -h 10 -style "single";
- separator -h 10 -style "none";
-
- // Stroke commands.
- columnLayout ;
- textFieldGrp -label "Before Stroke Cmd"
- -cw2 135 200
- -ann "Command executed before the stroke."
- artPreStrokeTextField;
- textFieldGrp -label "After Stroke Cmd"
- -cw2 135 200
- -ann "Command executed after the stroke."
- artPostStrokeTextField;
- separator -h 5 -style "none";
- setParent ..;
- }
-
-
- if ( $currTool == "artAttr" ) {
- checkBoxGrp
- -label ""
- -l1 "Update Continuously"
- -ann "Update attribute values during a stroke."
- artAttrInteractiveUpdate;
- }
-
-
- separator -h 10 -style "none";
-
- setParent ..;
-
- setUITemplate -popTemplate;
- }
-
-
- global proc artisanCreatePressureFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Create a stylus pressure frame for all Arisan tools.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout;
- // Tablet Pressure.
- checkBoxGrp
- -l "" -l1 "Stylus Pressure"
- -ann "Turn on/off stylus pressure."
- artStylusPressureChkBox;
-
- // Pressure mapping.
- columnLayout artPressureMappingLayout;
- optionMenuGrp -l "Pressure Mapping"
- -ann "Mapping of the tablet pressure."
- artStylusPressureOpMenu;
-
- menuItem -l "Opacity" artMapOpacity;
- menuItem -l "Radius" artMapRadius;
- menuItem -l "Both" artMapBoth;
- setParent ..;
- setParent ..;
-
- setUITemplate -popTemplate;
- }
-
-
- // ============================================================
- // Attribute Maps.
- // ============================================================
-
- proc artisanCreateImportFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Create the import attribue map options.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout artImportFrameLayout;
- separator -h 5 -style "none";
-
- // File browser.
- rowColumnLayout -nc 2
- -cs 1 52
- -cw 1 82
- -cw 2 110;
-
- text -l "Map Name " -ann "Attribue map browser.";
- button -l " Import... " importMapBrowseButton;
- setParent ..;
-
- separator -h 5 -style "none";
-
- checkBoxGrp
- -l ""
- -l1 "Reassign Attribute Maps "
- reassignMapsChkBox;
-
- separator -h 5 -style "none";
-
- frameLayout -lv false -bv false -cll true
- -cl ($currTool == "artFluidAttr") importChannelsFrame;
- optionMenuGrp -l "Import Value "
- -ann "Import channel/luminance."
- importMapValueMenu;
-
- if ( $currTool == "artAttrColorPerVertex" ) {
- menuItem -l "RGB" artImportMenu5;
- menuItem -l "RGBA" artImportMenu6;
- }else{
- menuItem -l "Luminance" artImportMenu0;
- menuItem -l "Alpha" artImportMenu1;
- menuItem -l "Red" artImportMenu2;
- menuItem -l "Green" artImportMenu3;
- menuItem -l "Blue" artImportMenu4;
- }
-
- setParent ..;
-
- separator -h 5 -style "none";
-
- // Display the treshhold for Paint Select tool.
- if ( $currTool == "artSelect" ) {
- columnLayout;
- floatSliderGrp -field true -l "Threshold "
- -ann "Import value threshold."
- -precision 4
- -min 0.000 -max 1.0
- -v 0.5 -step 0.05
- importThresholdSlider;
- setParent ..;
- separator -h 5 -style "none";
- }
- setParent ..;
-
- setUITemplate -popTemplate;
- }
-
-
- proc artisanCreateExportFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Create export attribute maps options.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout artExportFrameLayout ;
- separator -h 5 -style "none";
- rowColumnLayout -nc 2
- -cs 1 52
- -cw 1 82
- -cw 2 110;
-
- text -l "Map Name " -ann "Attribue map browser.";
- button -l " Export... " exportMapBrowseButton;
- setParent ..;
-
- separator -h 5 -style "none";
-
- frameLayout -lv false -bv false -cll true
- -cl ($currTool == "artFluidAttr") exportChannelsFrame;
- optionMenuGrp -l "Export Value "
- -ann "Export map value."
- exportMapValueMenu;
- menuItem -l "Luminance" artExportMenu0;
- menuItem -l "Alpha" artExportMenu1;
- menuItem -l "RGB" artExportMenu2;
- menuItem -l "RGBA" artExportMenu3;
- setParent ..;
-
- separator -h 5 -style "none";
-
- optionMenuGrp -l "Image Format"
- -ann "Attribute map image format."
- exportImageFormat;
- if(`about -mac`){
- menuItem -l "TIFF" fileFormatMenuItem0;
- menuItem -l "SGI" fileFormatMenuItem1;
- menuItem -l "IFF" fileFormatMenuItem2;
- menuItem -l "JPEG" fileFormatMenuItem3;
- menuItem -l "Targa" fileFormatMenuItem4;
- menuItem -l "WindowsBitmap" fileFormatMenuItem5;
- menuItem -l "QuickTime Image" fileFormatMenuItem6;
- menuItem -l "QuickDraw" fileFormatMenuItem7;
- menuItem -l "Photoshop" fileFormatMenuItem8;
- menuItem -l "PNG" fileFormatMenuItem9;
- menuItem -l "MacPaint" fileFormatMenuItem10;
- }else{
- menuItem -l "GIF" fileFormatMenuItem0;
- menuItem -l "SoftImage" fileFormatMenuItem1;
- menuItem -l "RLA" fileFormatMenuItem2;
- menuItem -l "TIFF" fileFormatMenuItem3;
- menuItem -l "SGI" fileFormatMenuItem4;
- menuItem -l "Alias" fileFormatMenuItem5;
- menuItem -l "IFF" fileFormatMenuItem6;
- menuItem -l "JPEG" fileFormatMenuItem7;
- menuItem -l "EPS" fileFormatMenuItem8;
- menuItem -l "Quantel" fileFormatMenuItem9;
- }
-
- separator -h 5 -style "none";
-
- checkBoxGrp
- -l ""
- -l1 "Keep Aspect Ratio "
- exportKeepAspectChkBox;
-
- separator -h 5 -style "none";
-
- intSliderGrp -field true -l "Map Size X"
- -ann "Size of the attribute map X."
- -min 1 -max 8192
- -v 256 -ss 256
- exportMapSizeXSlider;
-
- intSliderGrp -field true -l "Map Size Y"
- -ann "Size of the attribute map Y."
- -min 1 -max 8192
- -v 256 -ss 256
- exportMapSizeYSlider;
-
- separator -h 5 -style "none";
- setParent ..;
-
- setUITemplate -popTemplate;
- }
-
-
- global proc artisanCreateAttrMapFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Import/Export of attribute maps properties.
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout -adj true artisanAttrMap;
-
- // Import attribute map frame.
- frameLayout -l " Import "
- -collapsable true -collapse true
- artisanImportFrame;
-
- // Create the import frame.
- artisanCreateImportFrame( "artisanImportFrame", $currTool );
- setParent ..;
-
- // Only some of the tools support exporting
- // of the attribute maps.
- if ( ( $currTool == "artSelect" )
- || ( $currTool == "artAttr" )
- || ( $currTool == "artAttrColorPerVertex" )
- || ( $currTool == "artFluidAttr" )
- )
- {
- // Export attribute map frame.
- frameLayout -l " Export "
- -collapsable true -collapse true
- artisanExportFrame;
-
- // Create the import frame.
- artisanCreateExportFrame( "artisanExportFrame", $currTool );
- setParent ..;
- }
- setParent ..; // columnLayout artisanAttrMap
-
- setUITemplate -popTemplate;
- }
-
-
- global proc artisanCreateDisplayFrame(
- string $parent,
- string $currTool
- )
- //
- // Description:
- // Display .
- //
- {
- setUITemplate -pushTemplate OptionsTemplate;
- setParent $parent;
-
- columnLayout;
- checkBoxGrp -ncb 1
- -l " "
- -l1 "Draw Outline"
- -ann "Draw brush outline."
- artDrawOutlineChkBox;
-
- checkBoxGrp -ncb 1
- -l ""
- -l1 "Draw Outline while Painting"
- -ann "Turn on/off brush feedback while painting."
- artBrushWhilePaintingChkBox;
-
- checkBoxGrp -ncb 1
- -l ""
- -l1 "Draw Brush Feedback"
- -ann "Draw additional brush feedback."
- artBrushFeedbackChkBox;
-
- checkBoxGrp -ncb 1
- -l ""
- -l1 "Show Wireframe"
- -ann "Draw wireframe in shaded mode."
- artShowActiveLinesChkBox;
-
- // Support for color feedback.
- if ( $currTool == "artAttr" || $currTool == "artAttrSkin" ) {
- separator -h 20 -style "none";
-
- // Color Feedback.
- checkBoxGrp -ncb 1
- -l ""
- -l1 "Color Feedback"
- -ann "Color feedback switch."
- artColorFeedbackChkBox;
-
- separator -h 5 -style "none";
-
- floatSliderGrp -field true -l "Min Color"
- -ann "Min value for color feedback display."
- -precision 4
- -min -5.0 -max 5.0
- -step 0.1
- -fmn -1000.0 -fmx 1000.0
- artColorFeedbackMinSlider; // crLower
-
- floatSliderGrp -field true -l "Max Color"
- -ann "Max value for color feedback display."
- -precision 4
- -min -5.0 -max 5.0
- -step 0.1
- -fmn -1000.0 -fmx 1000.0
- artColorFeedbackMaxSlider; // crUpper;
- }
-
- separator -h 5 -style "none";
- setParent ..;
-
- setUITemplate -popTemplate;
- }
-